-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Fix sentinel connections #3376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix sentinel connections #3376
Conversation
When passing args to Redis(), using the connection_kwargs args allows us to use authentication and other connection features.
great, thank you! |
@garionphx Thanks for your contribution! Make sure that tests passes |
@garionphx Since this changes makes |
@@ -240,7 +240,7 @@ def __init__( | |||
self.sentinel_kwargs = sentinel_kwargs | |||
|
|||
self.sentinels = [ | |||
Redis(hostname, port, **self.sentinel_kwargs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As this is the only place where self.sentinel_kwargs
are used we have to remove it
This doesn't seem correct. The |
Hi @garionphx, Thanks for the contribution! We should keep sentinel_kwargs and connection_kwargs as separate arguments. These serve distinct purposes: we may need different connection settings for Sentinel nodes and for Redis servers (both master and slaves). For example, SSL configuration, authentication credentials, or even different users might vary between the two connection types. Keeping them as separate dictionaries is currently the only flexible and clean way to support these differences. That said, you can still supply usernames and credentials specifically for Sentinel connections via sentinel_kwargs. For these reasons, I am going to close this PR. |
When passing args to Redis(), using the connection_kwargs args allows us to use authentication and other connection features.
Pull Request check-list
Please make sure to review and check all of these items:
NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
Modified the arguments passed to Redis() when forming Sentinel connections